package main

import (
	"github.com/gin-gonic/gin"
	"log"
)

func Donating(c *gin.Context) {
	id := c.Query("id")
	err, sum, goal := AskDonateCount(id)
	if err != nil {
		log.Println(err)
		c.String(503, "%s", "error")
	}
	c.JSON(200, gin.H{"id": id, "sum": sum, "goal": goal})
}
